<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ping list</title>
</head>
<body style="text-align: center;">
	<a href='<c:url value="/ping/show" />' target="_self">create new Ping</a>
	<table border="1">
		<tr>
			<th>id</th>
			<th>age</th>
			<th>name</th>
			<th>createTime</th>
			<th>updateTime</th>
			<th>operate</th>
		</tr>
		<c:forEach items="${pings }" var="p">
			<tr>
				<td><c:out value="${p.id }" /></td>
				<td><c:out value="${p.age }" /></td>
				<td><c:out value="${p.name }" /></td>
				<td><fmt:formatDate value="${p.createTime }"
						pattern="yyyy-MM-dd hh:mm:ss" /></td>
				<td><fmt:formatDate value="${p.updateTime }"
						pattern="yyyy-MM-dd hh:mm:ss" /></td>
				<td><a href='<c:url value="/ping/show?id=${p.id }" />' target="_self">edit</a>&nbsp;&nbsp;
					<a href='<c:url value="/ping/delete/${p.id }"/>' target="_self">delete</a></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>